<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The GearmanJob class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="gearmanclient.timeout.html">GearmanClient::timeout</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="gearmanjob.complete.html">GearmanJob::complete</a></div>
 <div class="up"><a href="book.gearman.html">Gearman</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.gearmanjob" class="reference">

 <h1 class="title">The GearmanJob class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL gearman &gt;= 0.5.0)</p>


  <div class="section" id="gearmanjob.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    
   </p>
  </div>


  <div class="section" id="gearmanjob.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">GearmanJob</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.complete.html" class="methodname">complete</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$result</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="gearmanjob.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.data.html" class="methodname">data</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.exception.html" class="methodname">exception</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$exception</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.fail.html" class="methodname">fail</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="gearmanjob.functionname.html" class="methodname">functionName</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="gearmanjob.handle.html" class="methodname">handle</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="gearmanjob.returncode.html" class="methodname">returnCode</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.sendcomplete.html" class="methodname">sendComplete</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$result</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.senddata.html" class="methodname">sendData</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.sendexception.html" class="methodname">sendException</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$exception</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.sendfail.html" class="methodname">sendFail</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.sendstatus.html" class="methodname">sendStatus</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$numerator</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$denominator</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.sendwarning.html" class="methodname">sendWarning</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$warning</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.setreturn.html" class="methodname">setReturn</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$gearman_return_t</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.status.html" class="methodname">status</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$numerator</code></span>
   , <span class="methodparam"><span class="type">int</span> <code class="parameter">$denominator</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="gearmanjob.unique.html" class="methodname">unique</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="gearmanjob.warning.html" class="methodname">warning</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$warning</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="gearmanjob.workload.html" class="methodname">workload</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="gearmanjob.workloadsize.html" class="methodname">workloadSize</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>


  </div>

 </div>

 













































































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="gearmanjob.complete.html">GearmanJob::complete</a> — Send the result and complete status (deprecated)</li><li><a href="gearmanjob.construct.html">GearmanJob::__construct</a> — Create a GearmanJob instance</li><li><a href="gearmanjob.data.html">GearmanJob::data</a> — Send data for a running job (deprecated)</li><li><a href="gearmanjob.exception.html">GearmanJob::exception</a> — Send exception for running job (deprecated)</li><li><a href="gearmanjob.fail.html">GearmanJob::fail</a> — Send fail status (deprecated)</li><li><a href="gearmanjob.functionname.html">GearmanJob::functionName</a> — Get function name</li><li><a href="gearmanjob.handle.html">GearmanJob::handle</a> — Get the job handle</li><li><a href="gearmanjob.returncode.html">GearmanJob::returnCode</a> — Get last return code</li><li><a href="gearmanjob.sendcomplete.html">GearmanJob::sendComplete</a> — Send the result and complete status</li><li><a href="gearmanjob.senddata.html">GearmanJob::sendData</a> — Send data for a running job</li><li><a href="gearmanjob.sendexception.html">GearmanJob::sendException</a> — Send exception for running job (exception)</li><li><a href="gearmanjob.sendfail.html">GearmanJob::sendFail</a> — Send fail status</li><li><a href="gearmanjob.sendstatus.html">GearmanJob::sendStatus</a> — Send status</li><li><a href="gearmanjob.sendwarning.html">GearmanJob::sendWarning</a> — Send a warning</li><li><a href="gearmanjob.setreturn.html">GearmanJob::setReturn</a> — Set a return value</li><li><a href="gearmanjob.status.html">GearmanJob::status</a> — Send status (deprecated)</li><li><a href="gearmanjob.unique.html">GearmanJob::unique</a> — Get the unique identifier</li><li><a href="gearmanjob.warning.html">GearmanJob::warning</a> — Send a warning (deprecated)</li><li><a href="gearmanjob.workload.html">GearmanJob::workload</a> — Get workload</li><li><a href="gearmanjob.workloadsize.html">GearmanJob::workloadSize</a> — Get size of work load</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="gearmanclient.timeout.html">GearmanClient::timeout</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="gearmanjob.complete.html">GearmanJob::complete</a></div>
 <div class="up"><a href="book.gearman.html">Gearman</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
